/* DOT_OPERATIONS.H
 *
 * This file contains the dot operations. These are image operations
 * which can be directly performed on the source image. This is true
 * for operations which can calculate the new pixel value, without
 * having to know the value of pixels other than the one changed.
 * The size of the image will not be affected by performing a dot
 * operation.
 */

#pragma once

#include <math.h>
#include <vector>

#include "generic.h"
#include "image.h"
#include "operations.h"
#include "mainwindow.h"
#include "resource.h"

using namespace System;


//The setup methods return false to cancel the operation.
//The other (operation) methods return false on failure.

bool grayscaleSetup( Task *task );
bool grayscale( Image &img, void *data );

bool monotoneSetup( Task *task );
bool monotone( Image &img, void *data );

bool yCbCrSetup( Task *task );
bool yCbCr( Image &img, void *data );

/*	Toegevoegd door Jeroen,
	Simpele klasse om instellingen gemaakt in RGBLevelssetup op te slaan */
class RgbLevelsSettings
{
public:
	int _rOffset, _gOffset, _bOffset;
};

/*	
	Simpele klasse om instellingen gemaakt in TresholdSetup op te slaan */
class ThresholdSettings
{
public:
	int _threshold;
};
bool rgbLevelsSetup( Task *task );
bool rgbLevels( Image &img, void *data );


class ContrastSettings
{
public:
	int _low;
	int _high;
	bool _auto;
};

class MonotoneSettings
{
public:
	double _mono1;
	double _mono2;
	double _mono3;
	
};
bool contrastSetup( Task *task );
bool contrast( Image &img, void *data );

bool invertSetup( Task *task );
bool invert( Image &img, void *data );

bool thresholdSetup( Task *task );
bool threshold( Image &img, void *data );

class ExponentSettings
{
	public:
	double base;
};

bool exponentSetup( Task *task );
bool exponent( Image &img, void *data );

class LogarithmSettings
{
public:
	double scale;
	double offset;
};
bool logarithmSetup( Task *task );
bool logarithm( Image &img, void *data );

class NaturalLogarithmSettings
{
public:
	double scale;
	double offset;
};

bool naturalLogarithmSetup( Task *task );
bool naturalLogarithm( Image &img, void *data );
